package com.baichen.agent;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;
import reactor.core.publisher.Flux;

@AiService(
        wiringMode = AiServiceWiringMode.EXPLICIT,
        chatModel = "ollamaChatModel",
        chatMemoryProvider = "chatMemoryProviderInAgent",
        tools = "appointmentTools",
        contentRetriever = "contentRetrieverInAgent"
)
public interface CustomerServiceAgent {

    @SystemMessage(fromResource = "service-prompt-template.txt")
    String chat(@MemoryId Long memoryId, @UserMessage String userMessage);

    @SystemMessage(fromResource = "service-prompt-template.txt")
    Flux<String> chat2(@MemoryId Long memoryId, @UserMessage String userMessage);
}
